<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
    <ui:composition >
                <h:form>
              <table >
            <tr>
                <td colspan="3">
                 修改用户基本资料
                </td>
            </tr>
            <tr>
                <td >
                  校友ID：
                </td>
                <td>
                    <h:inputText  id="userid"  value="#{adminManageMbean.user.USER_ID}" readonly="true"/>
                </td>
                <td rowspan="7">
                    <rich:panel id="info" style="height: 240;width:320;">
                        <f:facet name="header">
                            <h:outputText value="预览" />
                        </f:facet>
                        <h:outputText value="无图片"
                                      rendered="#{adminManageMbean.diploma==null}" />
                        <a4j:mediaOutput element="img" mimeType="#{adminManageMbean.diploma.EXTENSION}"
                                         createContent="#{adminManageMbean.paintDIPLOMA}" value="1"
                                         style="height:200px;width:300px;" cacheable="false"
                                         rendered="#{adminManageMbean.diploma!=null}"/>
                    </rich:panel>
                </td>
            </tr>
            <tr>
                <td>
                  真实姓名：
                </td>
                <td>
                    <h:inputText id="name" value="#{adminManageMbean.user.NAME}"   />
                </td>
            </tr>
            <tr>
                <td>
                  毕业年级：
                </td>
                <td>
                    <h:selectOneMenu id="graduateyear" value="#{adminManageMbean.user.GRADUATE_YEAR}"   >
                        <f:selectItems value="#{CommonMbean.years}"/>
                    </h:selectOneMenu>
                </td>
            </tr>
            <tr>
                <td>
                    专业:
                </td>
                <td>
                    <h:inputText id="major" value="#{adminManageMbean.user.MAJOR}"   />
                </td>
            </tr>
            <tr>
                <td>
                 所在区：
                </td>
                <td>
                    <h:inputText id="szdistrict" value="#{adminManageMbean.user.SZ_DISTRICT}"   />
                </td>
            </tr>
            <tr>
                <td>
                  验证码：
                </td>
                <td>
                    <h:inputText value="#{adminManageMbean.vCode}" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <rich:paint2D id="painter" width="#{adminManageMbean.vc.width}" height="#{adminManageMbean.vc.height}"
                                  data="#{adminManageMbean.vc}" format="png" paint="#{adminManageMbean.paintVerifyCode}" />

                       <a4j:commandLink action="#{adminManageMbean.newVCodeActon}" immediate="true" reRender="painter" value="刷新验证码"/>
                </td>
            </tr>
        </table>
        <div>
            <a4j:commandButton value="#{user.STATUS=='Y'?'冻结':'激活'}" action="#{adminManageMbean.changeStatus}" immediate="true"  reRender="userList" >
                        <f:param  name="usermainid" value="#{adminManageMbean.user.ID}"/>
                        <f:param  name="status" value="#{adminManageMbean.user.STATUS=='Y'?'N':'Y'}"/>
            </a4j:commandButton>
            <a4j:commandButton  action="#{adminManageMbean.saveUserAction}" value="保存"/>
            <a4j:commandButton  action="back" value="返回" immediate="true"/>
        </div>
                </h:form>
    </ui:composition>
</html>